package com.niuwa.p2p.core.utils;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

/**
 * @ClassName: ApplicationContextUtil
 * @Description: 上下文加载类
 * @author: zhangbo
 * @date:2015年1月13日 下午3:31:45
 */
public class ApplicationContextUtil implements ApplicationContextAware {

	private static ApplicationContext applicationContext;

	@SuppressWarnings("static-access")
	@Override
	public void setApplicationContext(ApplicationContext _applicationContext)
			throws BeansException {
		this.applicationContext = _applicationContext;
	}

	public static ApplicationContext getApplicationContext() {
		return applicationContext;
	}

}
